<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title>历史数据 - 转炉终点预测系统</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css">
    <link rel="stylesheet" href="styles/unified.css">
    <link rel="stylesheet" href="styles/components.css">
    <link rel="stylesheet" href="styles/sidebar-theme.css">
    <link rel="stylesheet" href="styles/scale-fix.css">
    <link rel="stylesheet" href="styles/modal-dialog.css">
    <link rel="stylesheet" href="styles/model-pages.css">
</head>
<body>
    <!-- 侧边栏 -->
    <div class="sidebar">
        <div class="sidebar-header">
            <div class="sidebar-logo">
                <i class="fas fa-industry"></i>
            </div>
            <div class="sidebar-title">转炉终点预测系统</div>
        </div>
        <div class="sidebar-menu">
            <div class="sidebar-menu-title">主导航</div>
            <ul>
                <li><a href="index.html"><i class="fas fa-home"></i>首页</a></li>
                
                <li><a href="production-monitor.html"><i class="fas fa-chart-line"></i>生产监控</a></li>
                <li><a href="history-data.html" class="active"><i class="fas fa-history"></i>历史数据</a></li>
                <li><a href="quality-analysis.html"><i class="fas fa-flask"></i>质量分析</a></li>
            </ul>
            
            <div class="sidebar-menu-title">模型管理</div>
            <ul>
                <li><a href="model-details.html"><i class="fas fa-brain"></i>模型详情</a></li>
                <li><a href="model-config.html"><i class="fas fa-cogs"></i>模型配置</a></li>
                <li><a href="model-performance.html"><i class="fas fa-chart-bar"></i>模型性能</a></li>
                <li><a href="model-update.html"><i class="fas fa-sync-alt"></i>模型更新</a></li>
            </ul>
            
            <div class="sidebar-menu-title">系统设置</div>
            <ul>
                <li><a href="system-settings.html"><i class="fas fa-cog"></i>系统设置</a></li>
                <li><a href="online-analysis.html"><i class="fas fa-chart-bar"></i>在线分析</a></li>
            </ul>
        </div>
        <div class="sidebar-footer">
            <i class="fas fa-info-circle"></i>
            <span>系统版本：v2.5.3</span>
        </div>
    </div>

    <!-- 侧边栏遮罩层 -->
    <div class="sidebar-overlay"></div>

    <div class="container">
        <div class="header">
            <div class="header-left">
                <div>
                    <div class="title">历史数据</div>
                    <div class="subtitle">查询、分析和导出历史生产数据</div>
                </div>
            </div>
            <div class="header-right">
                <div class="header-icon">
                    <i class="fas fa-search"></i>
                </div>
                <div class="header-icon">
                    <i class="fas fa-bell"></i>
                    <span class="notification-badge">3</span>
                </div>
                <div class="dropdown">
                    <div class="user-dropdown dropdown-trigger">
                        <img src="https://randomuser.me/api/portraits/men/32.jpg" alt="用户头像" class="user-avatar">
                        <span class="user-name">工程师</span>
                        <i class="fas fa-chevron-down"></i>
                    </div>
                    <div class="dropdown-menu">
                        <a href="#" class="dropdown-item">
                            <i class="fas fa-user"></i>
                            <span>个人资料</span>
                        </a>
                        <a href="#" class="dropdown-item">
                            <i class="fas fa-cog"></i>
                            <span>账号设置</span>
                        </a>
                        <a href="#" class="dropdown-item">
                            <i class="fas fa-question-circle"></i>
                            <span>帮助中心</span>
                        </a>
                        <a href="login.html" class="dropdown-item">
                            <i class="fas fa-sign-out-alt"></i>
                            <span>退出登录</span>
                        </a>
                    </div>
                </div>
            </div>
        </div>

        <div class="content-wrapper">
            <!-- 数据查询面板 -->
            <div class="card">
                <div class="card-header">
                    <div class="card-title">
                        <i class="fas fa-filter"></i>
                        数据查询条件
                    </div>
                    <button class="btn btn-sm btn-secondary">
                        <i class="fas fa-redo"></i>
                        重置条件
                    </button>
                </div>
                <div class="card-content">
                    <div class="filter-form">
                        <div class="filter-row">
                            <div class="filter-item">
                                <label class="filter-label">设备选择</label>
                                <select class="form-control">
                                    <option>全部</option>
                                    <option>1号转炉</option>
                                    <option>2号转炉</option>
                                    <option>3号转炉</option>
                                </select>
                            </div>
                            <div class="filter-item">
                                <label class="filter-label">炉次编号</label>
                                <input type="text" class="form-control" placeholder="请输入炉次编号">
                            </div>
                            <div class="filter-item">
                                <label class="filter-label">钢种类型</label>
                                <select class="form-control">
                                    <option>全部</option>
                                    <option>普碳钢</option>
                                    <option>低合金钢</option>
                                    <option>高强钢</option>
                                    <option>其他</option>
                                </select>
                            </div>
                        </div>
                        <div class="filter-row">
                            <div class="filter-item date-range">
                                <label class="filter-label">日期范围</label>
                                <div class="date-inputs">
                                    <input type="date" class="form-control" value="2023-11-01">
                                    <span class="date-separator">至</span>
                                    <input type="date" class="form-control" value="2023-11-28">
                                </div>
                            </div>
                            <div class="filter-item">
                                <label class="filter-label">数据状态</label>
                                <select class="form-control">
                                    <option>全部</option>
                                    <option>正常</option>
                                    <option>异常</option>
                                    <option>手动修正</option>
                                </select>
                            </div>
                        </div>
                        <div class="filter-actions">
                            <button class="btn btn-primary">
                                <i class="fas fa-search"></i>
                                查询数据
                            </button>
                            <button class="btn btn-secondary">
                                <i class="fas fa-download"></i>
                                导出数据
                            </button>
                        </div>
                    </div>
                </div>
            </div>
            
            <!-- 数据表格 -->
            <div class="card">
                <div class="card-header">
                    <div class="card-title">
                        <i class="fas fa-table"></i>
                        历史炉次数据
                    </div>
                    <div class="table-actions">
                        <div class="dropdown">
                            <button class="btn btn-sm btn-secondary dropdown-trigger">
                                <i class="fas fa-cog"></i>
                                表格设置
                            </button>
                            <div class="dropdown-menu">
                                <a href="#" class="dropdown-item">自定义列</a>
                                <a href="#" class="dropdown-item">保存当前视图</a>
                                <a href="#" class="dropdown-item">设置条件筛选</a>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="card-content">
                    <div class="table-responsive">
                        <table>
                            <thead>
                                <tr>
                                    <th>炉次编号</th>
                                    <th>设备</th>
                                    <th>钢种</th>
                                    <th>开始时间</th>
                                    <th>结束时间</th>
                                    <th>初始温度(°C)</th>
                                    <th>终点温度(°C)</th>
                                    <th>初始碳含量(%)</th>
                                    <th>终点碳含量(%)</th>
                                    <th>状态</th>
                                    <th>操作</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr>
                                    <td>B2023112801</td>
                                    <td>1号转炉</td>
                                    <td>普碳钢</td>
                                    <td>2023-11-28 09:15:28</td>
                                    <td>2023-11-28 09:42:15</td>
                                    <td>1545.2</td>
                                    <td>1632.8</td>
                                    <td>3.45</td>
                                    <td>0.042</td>
                                    <td><span class="status-badge active">正常</span></td>
                                    <td>
                                        <div class="row-actions">
                                            <button class="action-btn" title="查看详情">
                                                <i class="fas fa-eye"></i>
                                            </button>
                                            <button class="action-btn" title="导出">
                                                <i class="fas fa-download"></i>
                                            </button>
                                        </div>
                                    </td>
                                </tr>
                                <tr>
                                    <td>B2023112754</td>
                                    <td>3号转炉</td>
                                    <td>低合金钢</td>
                                    <td>2023-11-28 08:02:45</td>
                                    <td>2023-11-28 08:42:15</td>
                                    <td>1532.8</td>
                                    <td>1625.4</td>
                                    <td>3.62</td>
                                    <td>0.056</td>
                                    <td><span class="status-badge warning">偏差</span></td>
                                    <td>
                                        <div class="row-actions">
                                            <button class="action-btn" title="查看详情">
                                                <i class="fas fa-eye"></i>
                                            </button>
                                            <button class="action-btn" title="导出">
                                                <i class="fas fa-download"></i>
                                            </button>
                                        </div>
                                    </td>
                                </tr>
                                <tr>
                                    <td>B2023112753</td>
                                    <td>2号转炉</td>
                                    <td>高强钢</td>
                                    <td>2023-11-28 07:35:12</td>
                                    <td>2023-11-28 08:15:40</td>
                                    <td>1528.6</td>
                                    <td>1645.2</td>
                                    <td>3.58</td>
                                    <td>0.038</td>
                                    <td><span class="status-badge active">正常</span></td>
                                    <td>
                                        <div class="row-actions">
                                            <button class="action-btn" title="查看详情">
                                                <i class="fas fa-eye"></i>
                                            </button>
                                            <button class="action-btn" title="导出">
                                                <i class="fas fa-download"></i>
                                            </button>
                                        </div>
                                    </td>
                                </tr>
                                <tr>
                                    <td>B2023112752</td>
                                    <td>1号转炉</td>
                                    <td>普碳钢</td>
                                    <td>2023-11-28 06:55:33</td>
                                    <td>2023-11-28 07:28:22</td>
                                    <td>1535.4</td>
                                    <td>1628.5</td>
                                    <td>3.42</td>
                                    <td>0.045</td>
                                    <td><span class="status-badge active">正常</span></td>
                                    <td>
                                        <div class="row-actions">
                                            <button class="action-btn" title="查看详情">
                                                <i class="fas fa-eye"></i>
                                            </button>
                                            <button class="action-btn" title="导出">
                                                <i class="fas fa-download"></i>
                                            </button>
                                        </div>
                                    </td>
                                </tr>
                                <tr>
                                    <td>B2023112751</td>
                                    <td>3号转炉</td>
                                    <td>低合金钢</td>
                                    <td>2023-11-28 05:48:12</td>
                                    <td>2023-11-28 06:22:05</td>
                                    <td>1542.2</td>
                                    <td>1638.7</td>
                                    <td>3.65</td>
                                    <td>0.052</td>
                                    <td><span class="status-badge active">正常</span></td>
                                    <td>
                                        <div class="row-actions">
                                            <button class="action-btn" title="查看详情">
                                                <i class="fas fa-eye"></i>
                                            </button>
                                            <button class="action-btn" title="导出">
                                                <i class="fas fa-download"></i>
                                            </button>
                                        </div>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    
                    <div class="pagination">
                        <a href="#" class="pagination-item disabled">
                            <i class="fas fa-chevron-left"></i>
                        </a>
                        <a href="#" class="pagination-item active">1</a>
                        <a href="#" class="pagination-item">2</a>
                        <a href="#" class="pagination-item">3</a>
                        <a href="#" class="pagination-item">4</a>
                        <a href="#" class="pagination-item">5</a>
                        <a href="#" class="pagination-item">
                            <i class="fas fa-chevron-right"></i>
                        </a>
                    </div>
                </div>
            </div>
            
            <!-- 数据分析图表 -->
            <div class="section-title">数据分析图表</div>
            <div class="charts-container">
                <div class="card">
                    <div class="card-header">
                        <div class="card-title">
                            <i class="fas fa-chart-bar"></i>
                            终点温度分布
                        </div>
                        <div class="header-actions">
                            <select class="form-control form-control-sm">
                                <option>按设备分组</option>
                                <option>按钢种分组</option>
                                <option>按日期分组</option>
                            </select>
                        </div>
                    </div>
                    <div class="card-content">
                        <div class="chart-container">
                            <div class="chart-placeholder">
                                <i class="fas fa-chart-bar"></i>
                                <p>终点温度分布图</p>
                            </div>
                        </div>
                    </div>
                </div>
                
                <div class="card">
                    <div class="card-header">
                        <div class="card-title">
                            <i class="fas fa-chart-line"></i>
                            生产趋势分析
                        </div>
                        <div class="header-actions">
                            <select class="form-control form-control-sm">
                                <option>温度</option>
                                <option>碳含量</option>
                                <option>生产时间</option>
                            </select>
                        </div>
                    </div>
                    <div class="card-content">
                        <div class="chart-container">
                            <div class="chart-placeholder">
                                <i class="fas fa-chart-line"></i>
                                <p>生产趋势分析图</p>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            
            <!-- 数据统计卡片 -->
            <div class="data-stats">
                <div class="stat-card">
                    <div class="stat-icon">
                        <i class="fas fa-fire"></i>
                    </div>
                    <div class="stat-content">
                        <div class="stat-value">1,253</div>
                        <div class="stat-label">本月总炉次</div>
                    </div>
                    <div class="stat-trend">
                        <i class="fas fa-arrow-up"></i>
                        <span>5.2%</span>
                    </div>
                </div>
                
                <div class="stat-card">
                    <div class="stat-icon">
                        <i class="fas fa-clock"></i>
                    </div>
                    <div class="stat-content">
                        <div class="stat-value">39.5</div>
                        <div class="stat-label">平均炉次时间(分钟)</div>
                    </div>
                    <div class="stat-trend down">
                        <i class="fas fa-arrow-down"></i>
                        <span>2.1%</span>
                    </div>
                </div>
                
                <div class="stat-card">
                    <div class="stat-icon">
                        <i class="fas fa-bullseye"></i>
                    </div>
                    <div class="stat-content">
                        <div class="stat-value">94.7%</div>
                        <div class="stat-label">合格率</div>
                    </div>
                    <div class="stat-trend">
                        <i class="fas fa-arrow-up"></i>
                        <span>1.8%</span>
                    </div>
                </div>
                
                <div class="stat-card">
                    <div class="stat-icon">
                        <i class="fas fa-exclamation-triangle"></i>
                    </div>
                    <div class="stat-content">
                        <div class="stat-value">28</div>
                        <div class="stat-label">异常数据量</div>
                    </div>
                    <div class="stat-trend down">
                        <i class="fas fa-arrow-down"></i>
                        <span>15.3%</span>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <!-- JavaScript引用 -->
    <script src="scripts/unified.js"></script>
    <script src="scripts/modal-dialog.js"></script>

    <style>
        /* 历史数据页面特有样式 */
        .section-title {
            font-size: 18px;
            font-weight: 600;
            margin: 20px 0 15px;
            color: var(--primary-dark);
            border-left: 4px solid var(--primary);
            padding-left: 10px;
        }
        
        /* 查询表单样式 */
        .filter-form {
            display: flex;
            flex-direction: column;
            gap: 20px;
        }
        
        .filter-row {
            display: flex;
            flex-wrap: wrap;
            gap: 20px;
        }
        
        .filter-item {
            flex: 1;
            min-width: 200px;
        }
        
        .filter-label {
            display: block;
            font-weight: 500;
            margin-bottom: 8px;
            color: var(--gray-dark);
        }
        
        .date-range {
            flex: 2;
        }
        
        .date-inputs {
            display: flex;
            align-items: center;
            gap: 10px;
        }
        
        .date-separator {
            color: var(--gray);
        }
        
        .filter-actions {
            display: flex;
            gap: 10px;
            margin-top: 10px;
        }
        
        /* 表格样式补充 */
        .table-actions {
            display: flex;
            gap: 10px;
        }
        
        .row-actions {
            display: flex;
            gap: 8px;
            justify-content: center;
        }
        
        .action-btn {
            width: 28px;
            height: 28px;
            border-radius: var(--radius-sm);
            background-color: rgba(0, 0, 0, 0.05);
            border: none;
            color: var(--gray);
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.2s;
        }
        
        .action-btn:hover {
            background-color: var(--primary);
            color: white;
        }
        
        /* 图表容器样式 */
        .charts-container {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
            gap: 20px;
            margin-bottom: 30px;
        }
        
        .chart-container {
            height: 300px;
            position: relative;
        }
        
        .chart-placeholder {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            background-color: rgba(0, 0, 0, 0.02);
            border-radius: var(--radius);
        }
        
        .chart-placeholder i {
            font-size: 48px;
            color: var(--gray);
            margin-bottom: 15px;
        }
        
        .chart-placeholder p {
            color: var(--gray);
        }
        
        /* 数据统计卡片 */
        .data-stats {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
            gap: 20px;
            margin-bottom: 30px;
        }
        
        .stat-card {
            background-color: white;
            border-radius: var(--radius);
            box-shadow: var(--shadow-sm);
            padding: 20px;
            display: flex;
            align-items: center;
            transition: all 0.3s;
        }
        
        .stat-card:hover {
            box-shadow: var(--shadow);
            transform: translateY(-2px);
        }
        
        .stat-icon {
            width: 50px;
            height: 50px;
            border-radius: 10px;
            background-color: rgba(25, 118, 210, 0.1);
            color: var(--primary);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 20px;
            margin-right: 15px;
        }
        
        .stat-content {
            flex: 1;
        }
        
        .stat-value {
            font-size: 24px;
            font-weight: 700;
            color: var(--primary-dark);
            margin-bottom: 5px;
        }
        
        .stat-label {
            font-size: 13px;
            color: var(--gray);
        }
        
        .stat-trend {
            display: flex;
            align-items: center;
            color: var(--success-color);
            font-weight: 500;
            font-size: 13px;
        }
        
        .stat-trend i {
            margin-right: 3px;
        }
        
        .stat-trend.down {
            color: var(--danger-color);
        }
        
        /* 分页样式 */
        .pagination {
            display: flex;
            justify-content: center;
            gap: 5px;
            margin-top: 20px;
        }
        
        .pagination-item {
            width: 36px;
            height: 36px;
            border-radius: var(--radius-sm);
            background-color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            text-decoration: none;
            color: var(--text-color);
            border: 1px solid rgba(0, 0, 0, 0.1);
            transition: all 0.2s;
        }
        
        .pagination-item:hover {
            background-color: rgba(0, 0, 0, 0.05);
        }
        
        .pagination-item.active {
            background-color: var(--primary);
            color: white;
            border-color: var(--primary);
        }
        
        .pagination-item.disabled {
            opacity: 0.5;
            pointer-events: none;
        }
        
        @media (max-width: 768px) {
            .filter-item {
                min-width: 100%;
            }
            
            .date-inputs {
                flex-direction: column;
                align-items: flex-start;
            }
            
            .date-separator {
                display: none;
            }
            
            .charts-container,
            .data-stats {
                grid-template-columns: 1fr;
            }
        }
    </style>
</body>
</html> 